<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function f(n) {
        var a=1;//第一个数是1
        var b=1;//第二个数是1
        var c=b;//循环到最后c已经赋值给了b，此时输出的数其实是b
        for (var i=2;i<=n;i++){
            c=a+b;
            a=b;
            b=c;
        }
        return c;
    }
    alert(f(100));
</script>
</body>
</html>